<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>Aria: ArAnalogGyro Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Aria
   &#160;<span id="projectnumber">2.9.1</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li><a href="examples.html"><span>Examples</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('classArAnalogGyro.html','');});
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pro-types">Protected Types</a> &#124;
<a href="#pro-attribs">Protected Attributes</a> &#124;
<a href="classArAnalogGyro-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">ArAnalogGyro Class Reference<div class="ingroups"><a class="el" href="group__OptionalClasses.html">Optional Classes</a></div></div>  </div>
</div><!--header-->
<div class="contents">

<p>Use onboard gyro to improve the heading in an <a class="el" href="classArRobot.html" title="Central class for communicating with and operating the robot. ">ArRobot</a> object's pose value.  
 <a href="classArAnalogGyro.html#details">More...</a></p>

<p><code>#include &lt;ArAnalogGyro.h&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a348f63883ab1ea70b09ef64c1b6a7346"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a348f63883ab1ea70b09ef64c1b6a7346"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArAnalogGyro.html#a348f63883ab1ea70b09ef64c1b6a7346">activate</a> (void)</td></tr>
<tr class="memdesc:a348f63883ab1ea70b09ef64c1b6a7346"><td class="mdescLeft">&#160;</td><td class="mdescRight">Lets the gyro correct readings. <br /></td></tr>
<tr class="separator:a348f63883ab1ea70b09ef64c1b6a7346"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a181a493d95d37309d3618cab02ea863c"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a181a493d95d37309d3618cab02ea863c"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArAnalogGyro.html#a181a493d95d37309d3618cab02ea863c">activateGyroOnly</a> (void)</td></tr>
<tr class="memdesc:a181a493d95d37309d3618cab02ea863c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Activates it and puts it in gyro only mode. <br /></td></tr>
<tr class="separator:a181a493d95d37309d3618cab02ea863c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afcb9db5ed1efd9206d0574c30c44fd75"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="afcb9db5ed1efd9206d0574c30c44fd75"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArAnalogGyro.html#afcb9db5ed1efd9206d0574c30c44fd75">ArAnalogGyro</a> (<a class="el" href="classArRobot.html">ArRobot</a> *robot)</td></tr>
<tr class="memdesc:afcb9db5ed1efd9206d0574c30c44fd75"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor. <br /></td></tr>
<tr class="separator:afcb9db5ed1efd9206d0574c30c44fd75"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a952a03f5014a7df96bf26affeb5bcbde"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a952a03f5014a7df96bf26affeb5bcbde"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArAnalogGyro.html#a952a03f5014a7df96bf26affeb5bcbde">deactivate</a> (void)</td></tr>
<tr class="memdesc:a952a03f5014a7df96bf26affeb5bcbde"><td class="mdescLeft">&#160;</td><td class="mdescRight">Stops the gyro from correcting readings (still accumulates) <br /></td></tr>
<tr class="separator:a952a03f5014a7df96bf26affeb5bcbde"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab34c3db403e16d49a670aae37e263600"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab34c3db403e16d49a670aae37e263600"></a>
double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArAnalogGyro.html#ab34c3db403e16d49a670aae37e263600">encoderCorrect</a> (<a class="el" href="classArPoseWithTime.html">ArPoseWithTime</a> deltaPose)</td></tr>
<tr class="memdesc:ab34c3db403e16d49a670aae37e263600"><td class="mdescLeft">&#160;</td><td class="mdescRight">internal function for correcting the encoder readings with the gyro data <br /></td></tr>
<tr class="separator:ab34c3db403e16d49a670aae37e263600"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8b2789ea6b66d06a23a39a6ed6d8318d"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a8b2789ea6b66d06a23a39a6ed6d8318d"></a>
double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArAnalogGyro.html#a8b2789ea6b66d06a23a39a6ed6d8318d">getAverage</a> (void) const </td></tr>
<tr class="memdesc:a8b2789ea6b66d06a23a39a6ed6d8318d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the most recently calculated average rotational velocity (over one. <br /></td></tr>
<tr class="separator:a8b2789ea6b66d06a23a39a6ed6d8318d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa6b554cbebb933a4ac40d994d79e33fc"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa6b554cbebb933a4ac40d994d79e33fc"></a>
<a class="el" href="classArTime.html">ArTime</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArAnalogGyro.html#aa6b554cbebb933a4ac40d994d79e33fc">getAverageTaken</a> (void) const </td></tr>
<tr class="memdesc:aa6b554cbebb933a4ac40d994d79e33fc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the time the last average was taken. <br /></td></tr>
<tr class="separator:aa6b554cbebb933a4ac40d994d79e33fc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a09b59b5296ee7a23a13ccc708924fe55"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a09b59b5296ee7a23a13ccc708924fe55"></a>
double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArAnalogGyro.html#a09b59b5296ee7a23a13ccc708924fe55">getHeading</a> (void) const </td></tr>
<tr class="memdesc:a09b59b5296ee7a23a13ccc708924fe55"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets a heading calculated from past gyro readings. <br /></td></tr>
<tr class="separator:a09b59b5296ee7a23a13ccc708924fe55"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad70f6c7696a987ef7cf61f191d5683d3"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad70f6c7696a987ef7cf61f191d5683d3"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArAnalogGyro.html#ad70f6c7696a987ef7cf61f191d5683d3">getPacCount</a> (void)</td></tr>
<tr class="memdesc:ad70f6c7696a987ef7cf61f191d5683d3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the number of readings taken in the last second. <br /></td></tr>
<tr class="separator:ad70f6c7696a987ef7cf61f191d5683d3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a78a487966ec9c1b29ac64411179b8b33"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a78a487966ec9c1b29ac64411179b8b33"></a>
double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArAnalogGyro.html#a78a487966ec9c1b29ac64411179b8b33">getScalingFactor</a> (void) const </td></tr>
<tr class="memdesc:a78a487966ec9c1b29ac64411179b8b33"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the scaling factor used for multiplying the reading values received (default 1.626) <br /></td></tr>
<tr class="separator:a78a487966ec9c1b29ac64411179b8b33"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aef6791135cfab49f24ebd05bf39a4775"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aef6791135cfab49f24ebd05bf39a4775"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArAnalogGyro.html#aef6791135cfab49f24ebd05bf39a4775">getTemperature</a> (void) const </td></tr>
<tr class="memdesc:aef6791135cfab49f24ebd05bf39a4775"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the temperature the gyro has. <br /></td></tr>
<tr class="separator:aef6791135cfab49f24ebd05bf39a4775"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8690af8a89ed3a7c10dd1a85d6631ea2"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a8690af8a89ed3a7c10dd1a85d6631ea2"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArAnalogGyro.html#a8690af8a89ed3a7c10dd1a85d6631ea2">handleGyroPacket</a> (<a class="el" href="classArRobotPacket.html">ArRobotPacket</a> *packet)</td></tr>
<tr class="memdesc:a8690af8a89ed3a7c10dd1a85d6631ea2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Internal packet handler for the gyro packets. <br /></td></tr>
<tr class="separator:a8690af8a89ed3a7c10dd1a85d6631ea2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af2be799c353c1dfc70a300506513a5c9"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="af2be799c353c1dfc70a300506513a5c9"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArAnalogGyro.html#af2be799c353c1dfc70a300506513a5c9">hasGyroOnlyMode</a> (void)</td></tr>
<tr class="memdesc:af2be799c353c1dfc70a300506513a5c9"><td class="mdescLeft">&#160;</td><td class="mdescRight">If we have a gyro only mode. <br /></td></tr>
<tr class="separator:af2be799c353c1dfc70a300506513a5c9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a787910e4d8d9f0d4da8bb0d9dbdca3d8"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a787910e4d8d9f0d4da8bb0d9dbdca3d8"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArAnalogGyro.html#a787910e4d8d9f0d4da8bb0d9dbdca3d8">hasNoInternalData</a> (void)</td></tr>
<tr class="memdesc:a787910e4d8d9f0d4da8bb0d9dbdca3d8"><td class="mdescLeft">&#160;</td><td class="mdescRight">If this class actually has data or not (if it has no data, the robot is all there is) <br /></td></tr>
<tr class="separator:a787910e4d8d9f0d4da8bb0d9dbdca3d8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae1b9bf579a6c3c93fb14a1993221515f"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ae1b9bf579a6c3c93fb14a1993221515f"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArAnalogGyro.html#ae1b9bf579a6c3c93fb14a1993221515f">haveGottenData</a> (void)</td></tr>
<tr class="memdesc:ae1b9bf579a6c3c93fb14a1993221515f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns true if any amount of gyro data has yet been received, false if no readings have yet been received from the robot. <br /></td></tr>
<tr class="separator:ae1b9bf579a6c3c93fb14a1993221515f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa52421c328826c1bffe9a2dac22c189c"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa52421c328826c1bffe9a2dac22c189c"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArAnalogGyro.html#aa52421c328826c1bffe9a2dac22c189c">isActive</a> (void)</td></tr>
<tr class="memdesc:aa52421c328826c1bffe9a2dac22c189c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets if we really have a gyro or not. <br /></td></tr>
<tr class="separator:aa52421c328826c1bffe9a2dac22c189c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a592159b97420b2a3734aaa2678c7d191"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a592159b97420b2a3734aaa2678c7d191"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArAnalogGyro.html#a592159b97420b2a3734aaa2678c7d191">isGyroOnlyActive</a> (void)</td></tr>
<tr class="memdesc:a592159b97420b2a3734aaa2678c7d191"><td class="mdescLeft">&#160;</td><td class="mdescRight">If we're using gyro only mode. <br /></td></tr>
<tr class="separator:a592159b97420b2a3734aaa2678c7d191"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adf79bb9ba052a50318737c5346f6ea1a"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArAnalogGyro.html#adf79bb9ba052a50318737c5346f6ea1a">setFilterModel</a> (double gyroSigma, double inertialVar, double rotVar, double transVar)</td></tr>
<tr class="memdesc:adf79bb9ba052a50318737c5346f6ea1a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the parameters of the Kalman filter model.  <a href="#adf79bb9ba052a50318737c5346f6ea1a">More...</a><br /></td></tr>
<tr class="separator:adf79bb9ba052a50318737c5346f6ea1a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aea926050ec8475bb5bb00285accfbebb"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aea926050ec8475bb5bb00285accfbebb"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArAnalogGyro.html#aea926050ec8475bb5bb00285accfbebb">setLogAnomalies</a> (bool logAnomalies)</td></tr>
<tr class="memdesc:aea926050ec8475bb5bb00285accfbebb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets whether we log anomalies or not (temporary function for debugging) <br /></td></tr>
<tr class="separator:aea926050ec8475bb5bb00285accfbebb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afdd085205f33f012913cf2fc46d4b5dd"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="afdd085205f33f012913cf2fc46d4b5dd"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArAnalogGyro.html#afdd085205f33f012913cf2fc46d4b5dd">setScalingFactor</a> (double factor)</td></tr>
<tr class="memdesc:afdd085205f33f012913cf2fc46d4b5dd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the scaling factor used for multiplying the readings. <br /></td></tr>
<tr class="separator:afdd085205f33f012913cf2fc46d4b5dd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2c3271e785a2257533f14517b8dbc0cf"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a2c3271e785a2257533f14517b8dbc0cf"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArAnalogGyro.html#a2c3271e785a2257533f14517b8dbc0cf">stabilizingCallback</a> (void)</td></tr>
<tr class="memdesc:a2c3271e785a2257533f14517b8dbc0cf"><td class="mdescLeft">&#160;</td><td class="mdescRight">Internal connection callback; delays for a short amount of time to give the gyro enough time to stabilize before we try to use it. <br /></td></tr>
<tr class="separator:a2c3271e785a2257533f14517b8dbc0cf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aef48ac60334a055b5c9b1f2eec2c9146"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aef48ac60334a055b5c9b1f2eec2c9146"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArAnalogGyro.html#aef48ac60334a055b5c9b1f2eec2c9146">userTaskCallback</a> (void)</td></tr>
<tr class="memdesc:aef48ac60334a055b5c9b1f2eec2c9146"><td class="mdescLeft">&#160;</td><td class="mdescRight">Internal user task callback. <br /></td></tr>
<tr class="separator:aef48ac60334a055b5c9b1f2eec2c9146"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adcadb27031049ae191f31164a4ddc412"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="adcadb27031049ae191f31164a4ddc412"></a>
virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArAnalogGyro.html#adcadb27031049ae191f31164a4ddc412">~ArAnalogGyro</a> ()</td></tr>
<tr class="memdesc:adcadb27031049ae191f31164a4ddc412"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destructor. <br /></td></tr>
<tr class="separator:adcadb27031049ae191f31164a4ddc412"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-types"></a>
Protected Types</h2></td></tr>
<tr class="memitem:a6151dc37d9f0cd16117b1c3f80f39715"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArAnalogGyro.html#a6151dc37d9f0cd16117b1c3f80f39715">GyroType</a> { <a class="el" href="classArAnalogGyro.html#a6151dc37d9f0cd16117b1c3f80f39715a5699b9b8f84a724aaca07a1c83ac84e7">GYRO_NONE</a>, 
<a class="el" href="classArAnalogGyro.html#a6151dc37d9f0cd16117b1c3f80f39715af67cf1e1d44e92489f591a3e37f63a1d">GYRO_ANALOG_COMPUTER</a>, 
<a class="el" href="classArAnalogGyro.html#a6151dc37d9f0cd16117b1c3f80f39715aefdf538347ba0ee6431506b8fcb6f570">GYRO_ANALOG_CONTROLLER</a>
 }<tr class="memdesc:a6151dc37d9f0cd16117b1c3f80f39715"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gyro type.  <a href="classArAnalogGyro.html#a6151dc37d9f0cd16117b1c3f80f39715">More...</a><br /></td></tr>
</td></tr>
<tr class="separator:a6151dc37d9f0cd16117b1c3f80f39715"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr class="memitem:a57c363cd63026896f2144fd97d5df6a9"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a57c363cd63026896f2144fd97d5df6a9"></a>
double&#160;</td><td class="memItemRight" valign="bottom"><b>myAccumulatedDelta</b></td></tr>
<tr class="separator:a57c363cd63026896f2144fd97d5df6a9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a825c890cfda77735a5e7a254fd0a43f6"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a825c890cfda77735a5e7a254fd0a43f6"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><b>myAverageCount</b></td></tr>
<tr class="separator:a825c890cfda77735a5e7a254fd0a43f6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1d6c2fe78803cc5cccef51b6ef6ad2ea"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1d6c2fe78803cc5cccef51b6ef6ad2ea"></a>
<a class="el" href="classArTime.html">ArTime</a>&#160;</td><td class="memItemRight" valign="bottom"><b>myAverageStarted</b></td></tr>
<tr class="separator:a1d6c2fe78803cc5cccef51b6ef6ad2ea"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7d8f0a60cf01278c3c7ef304fa44dc55"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a7d8f0a60cf01278c3c7ef304fa44dc55"></a>
double&#160;</td><td class="memItemRight" valign="bottom"><b>myAverageTotal</b></td></tr>
<tr class="separator:a7d8f0a60cf01278c3c7ef304fa44dc55"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a00911aabfad932a357566eea73c1ff8f"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a00911aabfad932a357566eea73c1ff8f"></a>
<a class="el" href="classArRetFunctor1C.html">ArRetFunctor1C</a>&lt; double, <a class="el" href="classArAnalogGyro.html">ArAnalogGyro</a>, <a class="el" href="classArPoseWithTime.html">ArPoseWithTime</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>myEncoderCorrectCB</b></td></tr>
<tr class="separator:a00911aabfad932a357566eea73c1ff8f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8ccbaf81438bf84884fe29c51c0ab553"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a8ccbaf81438bf84884fe29c51c0ab553"></a>
double&#160;</td><td class="memItemRight" valign="bottom"><b>myGyroSigma</b></td></tr>
<tr class="separator:a8ccbaf81438bf84884fe29c51c0ab553"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3e21a11b011acc85fbc8e9cdcd286bb7"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a3e21a11b011acc85fbc8e9cdcd286bb7"></a>
<a class="el" href="classArAnalogGyro.html#a6151dc37d9f0cd16117b1c3f80f39715">GyroType</a>&#160;</td><td class="memItemRight" valign="bottom"><b>myGyroType</b></td></tr>
<tr class="separator:a3e21a11b011acc85fbc8e9cdcd286bb7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:affe70db664ce0f714061eb4c9a82f441"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="affe70db664ce0f714061eb4c9a82f441"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>myGyroWorking</b></td></tr>
<tr class="separator:affe70db664ce0f714061eb4c9a82f441"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae5073defd8faf7ddd87404d346384c5c"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ae5073defd8faf7ddd87404d346384c5c"></a>
<a class="el" href="classArRetFunctor1C.html">ArRetFunctor1C</a>&lt; bool, <a class="el" href="classArAnalogGyro.html">ArAnalogGyro</a>, <a class="el" href="classArRobotPacket.html">ArRobotPacket</a> * &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>myHandleGyroPacketCB</b></td></tr>
<tr class="separator:ae5073defd8faf7ddd87404d346384c5c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a091031a096a19835378a22af02c8f77a"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a091031a096a19835378a22af02c8f77a"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>myHasGyroOnlyMode</b></td></tr>
<tr class="separator:a091031a096a19835378a22af02c8f77a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a45b2d1ec46173122466a673a63c09d67"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a45b2d1ec46173122466a673a63c09d67"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>myHasNoData</b></td></tr>
<tr class="separator:a45b2d1ec46173122466a673a63c09d67"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9f141f77ef3666a55faee9f1a2b4fabf"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a9f141f77ef3666a55faee9f1a2b4fabf"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>myHaveGottenData</b></td></tr>
<tr class="separator:a9f141f77ef3666a55faee9f1a2b4fabf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a41b7fbe1ceed65da29acda6a46919e0d"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a41b7fbe1ceed65da29acda6a46919e0d"></a>
double&#160;</td><td class="memItemRight" valign="bottom"><b>myHeading</b></td></tr>
<tr class="separator:a41b7fbe1ceed65da29acda6a46919e0d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4985e9a23f39ca13e65a7dce68d9c954"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a4985e9a23f39ca13e65a7dce68d9c954"></a>
double&#160;</td><td class="memItemRight" valign="bottom"><b>myInertialVarianceModel</b></td></tr>
<tr class="separator:a4985e9a23f39ca13e65a7dce68d9c954"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7a351d074105f33784c41e5d6d6ac3f6"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a7a351d074105f33784c41e5d6d6ac3f6"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>myIsActive</b></td></tr>
<tr class="separator:a7a351d074105f33784c41e5d6d6ac3f6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acdc492d410030b4a85a33dd7cd788eff"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="acdc492d410030b4a85a33dd7cd788eff"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>myIsGyroOnlyActive</b></td></tr>
<tr class="separator:acdc492d410030b4a85a33dd7cd788eff"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af26836a108f0d4eb99f935a0c3d389fd"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="af26836a108f0d4eb99f935a0c3d389fd"></a>
double&#160;</td><td class="memItemRight" valign="bottom"><b>myLastAverage</b></td></tr>
<tr class="separator:af26836a108f0d4eb99f935a0c3d389fd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa84194d526fdb7a356c715c0640cb508"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa84194d526fdb7a356c715c0640cb508"></a>
<a class="el" href="classArTime.html">ArTime</a>&#160;</td><td class="memItemRight" valign="bottom"><b>myLastAverageTaken</b></td></tr>
<tr class="separator:aa84194d526fdb7a356c715c0640cb508"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abcf7550695bf90e7adde543fd5b7e457"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="abcf7550695bf90e7adde543fd5b7e457"></a>
double&#160;</td><td class="memItemRight" valign="bottom"><b>myLastHeading</b></td></tr>
<tr class="separator:abcf7550695bf90e7adde543fd5b7e457"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a983101827e5e497b4e3c3d250b71123c"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a983101827e5e497b4e3c3d250b71123c"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>myLogAnomalies</b></td></tr>
<tr class="separator:a983101827e5e497b4e3c3d250b71123c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5f26def687ab339540a84f75bb59d635"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5f26def687ab339540a84f75bb59d635"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><b>myPacCount</b></td></tr>
<tr class="separator:a5f26def687ab339540a84f75bb59d635"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac78597ec56a64c1211f4664f6677ae5f"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac78597ec56a64c1211f4664f6677ae5f"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><b>myPacCurrentCount</b></td></tr>
<tr class="separator:ac78597ec56a64c1211f4664f6677ae5f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a340b7d3460f93b70c282c5e34efa288f"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a340b7d3460f93b70c282c5e34efa288f"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>myReadingThisCycle</b></td></tr>
<tr class="separator:a340b7d3460f93b70c282c5e34efa288f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afb8497054562f60fb6c2be95f0b6c36f"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="afb8497054562f60fb6c2be95f0b6c36f"></a>
<a class="el" href="classArRobot.html">ArRobot</a> *&#160;</td><td class="memItemRight" valign="bottom"><b>myRobot</b></td></tr>
<tr class="separator:afb8497054562f60fb6c2be95f0b6c36f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a76d66d0b753747629719b17613d9da66"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a76d66d0b753747629719b17613d9da66"></a>
double&#160;</td><td class="memItemRight" valign="bottom"><b>myRotVarianceModel</b></td></tr>
<tr class="separator:a76d66d0b753747629719b17613d9da66"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aedb3de2d7ff54e9d58ce1d3fad507b06"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aedb3de2d7ff54e9d58ce1d3fad507b06"></a>
double&#160;</td><td class="memItemRight" valign="bottom"><b>myScalingFactor</b></td></tr>
<tr class="separator:aedb3de2d7ff54e9d58ce1d3fad507b06"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aee0036db70f4d93fe8c23ce14ab3cd7a"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aee0036db70f4d93fe8c23ce14ab3cd7a"></a>
<a class="el" href="classArFunctorC.html">ArFunctorC</a>&lt; <a class="el" href="classArAnalogGyro.html">ArAnalogGyro</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>myStabilizingCB</b></td></tr>
<tr class="separator:aee0036db70f4d93fe8c23ce14ab3cd7a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3f00ae2696996a9bd7ffc384e016680f"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a3f00ae2696996a9bd7ffc384e016680f"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><b>myTemperature</b></td></tr>
<tr class="separator:a3f00ae2696996a9bd7ffc384e016680f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac2a1a408875215b05c82f69511c116d9"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac2a1a408875215b05c82f69511c116d9"></a>
time_t&#160;</td><td class="memItemRight" valign="bottom"><b>myTimeLastPacket</b></td></tr>
<tr class="separator:ac2a1a408875215b05c82f69511c116d9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6c279026ba146783a6730fbd8aef104f"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a6c279026ba146783a6730fbd8aef104f"></a>
double&#160;</td><td class="memItemRight" valign="bottom"><b>myTransVarianceModel</b></td></tr>
<tr class="separator:a6c279026ba146783a6730fbd8aef104f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac922a94c99128e1ad065e5a9bf2052ff"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac922a94c99128e1ad065e5a9bf2052ff"></a>
<a class="el" href="classArFunctorC.html">ArFunctorC</a>&lt; <a class="el" href="classArAnalogGyro.html">ArAnalogGyro</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>myUserTaskCB</b></td></tr>
<tr class="separator:ac922a94c99128e1ad065e5a9bf2052ff"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Use onboard gyro to improve the heading in an <a class="el" href="classArRobot.html" title="Central class for communicating with and operating the robot. ">ArRobot</a> object's pose value. </p>
<p>The gyro is an accessory connected to the robot's microcontroller. The gyro's purpose is to improve large errors due to wheel slippage, wheels coming off the ground, and other factors like this (or for the skid steer of an AT). The gyro also happens to provide temperature readings as well.</p>
<p>When an <a class="el" href="classArAnalogGyro.html" title="Use onboard gyro to improve the heading in an ArRobot object&#39;s pose value. ">ArAnalogGyro</a> object is created, it registers callbacks with the robot, and automatic heading correction will begin when new data arrives from the robot. If you delete the object, it will remove itself from the robot.</p>
<p>The readings come back from the gyro over the robot microcontroller's analog ports. The microcontroller then sends the readings to us just before sending us the standard packet. <a class="el" href="classArAnalogGyro.html" title="Use onboard gyro to improve the heading in an ArRobot object&#39;s pose value. ">ArAnalogGyro</a> uses these readings to calculate a better heading of the robot (integrating the velocities to give position). Then when the standard packet comes in, <a class="el" href="classArRobot.html" title="Central class for communicating with and operating the robot. ">ArRobot</a> calls an encoder correction callback in <a class="el" href="classArAnalogGyro.html" title="Use onboard gyro to improve the heading in an ArRobot object&#39;s pose value. ">ArAnalogGyro</a> which does a simple Kalman filter and fuses the encoder information's heading with the gyro's heading to compute the most probable heading which it then returns to the <a class="el" href="classArRobot.html" title="Central class for communicating with and operating the robot. ">ArRobot</a> object to use as its heading.</p>
<p>The robot's normal dead reconing angle is fairly good if you have properly inflated tires (if you have pneumatic tires) and if you have the revcount parameter sent correctly. See the robot operation manual for how to change the revcount parameter.</p>
<p>Gyro readings are affected by temperature (a temperature value is reported along with the gyro data in the packets from the microcontroller). The gyro will auto calibrate itself to the center of the range (which may have drifted due to temperature) whenever the robot is stationary for more than one second (that is, if its translational and rotational velocities are less than 1 and if the gyro readings are also within .5% of the average). The scaling factor (between change of voltage and amount of turn) doesn't seem to change due to temperature, though it can vary among different gyro devices. (This scaling factor can be accessed with <a class="el" href="classArAnalogGyro.html#a78a487966ec9c1b29ac64411179b8b33" title="Gets the scaling factor used for multiplying the reading values received (default 1...">getScalingFactor()</a> and <a class="el" href="classArAnalogGyro.html#afdd085205f33f012913cf2fc46d4b5dd" title="Sets the scaling factor used for multiplying the readings. ">setScalingFactor()</a>.) The default value used here was within 3% of correct most of the time. The default resides in the parameter file for the robot that is loaded or used when a connection is made. If you want to tune this more you can, by finding a different scale factor. (There is just one so there doesn't have to be alot of calibration in flash that is lost if parameters are loaded from a file.)</p>
<p>General notes on gyros and inertial correction: The purpose of the gyro is to correct for wheel slippage and large errors. It is not to totally correct for all errors, but to bring the errors into smaller zones that software can correct for more easily (such as by localization). We have found that if gyros or inertial measurement devices are used to attempt to correct for all error, the result can be not very robust, and include many problematic assumptions. For this reason, we have found that it is best to integrate this one simple gyro to simply improve robot odometry, rather than a complicated and expensive IMU. </p>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="demo_8cpp-example.html#_a11">demo.cpp</a>, <a class="el" href="gotoActionExample_8cpp-example.html#_a4">gotoActionExample.cpp</a>, and <a class="el" href="gyroExample_8cpp-example.html#_a2">gyroExample.cpp</a>.</dd>
</dl></div><h2 class="groupheader">Member Enumeration Documentation</h2>
<a class="anchor" id="a6151dc37d9f0cd16117b1c3f80f39715"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="classArAnalogGyro.html#a6151dc37d9f0cd16117b1c3f80f39715">ArAnalogGyro::GyroType</a></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Gyro type. </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a class="anchor" id="a6151dc37d9f0cd16117b1c3f80f39715a5699b9b8f84a724aaca07a1c83ac84e7"></a>GYRO_NONE&#160;</td><td class="fielddoc">
<p>No gyro. </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="a6151dc37d9f0cd16117b1c3f80f39715af67cf1e1d44e92489f591a3e37f63a1d"></a>GYRO_ANALOG_COMPUTER&#160;</td><td class="fielddoc">
<p>Analog gyro used by computer. </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="a6151dc37d9f0cd16117b1c3f80f39715aefdf538347ba0ee6431506b8fcb6f570"></a>GYRO_ANALOG_CONTROLLER&#160;</td><td class="fielddoc">
<p>Analog gyro used by microcontroller. </p>
</td></tr>
</table>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="adf79bb9ba052a50318737c5346f6ea1a"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void ArAnalogGyro::setFilterModel </td>
          <td>(</td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>gyroSigma</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>inertialVar</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>rotVar</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>transVar</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Set the parameters of the Kalman filter model. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">gyroSigma</td><td>the amount its off statically</td></tr>
    <tr><td class="paramname">inertialVar</td><td>the proportional amount it is off</td></tr>
    <tr><td class="paramname">rotVar</td><td>the amount the rotation is off proportionally</td></tr>
    <tr><td class="paramname">transVar</td><td>the amount the translation throws off the heading proportionally </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>ArAnalogGyro.h</li>
<li>ArAnalogGyro.cpp</li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="classArAnalogGyro.html">ArAnalogGyro</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.11 </li>
  </ul>
</div>
</body>
</html>
